package ru.study.thinkin.chapter10;

public class Parcel5 {
	private long id = 5L; 
	
	public Destination dest(String s) {
		class PDestination implements Destination {
			private String label;
			public long id = 1L;
			
			private PDestination(String whereTo) {
				label = whereTo;
			}
			public String readLabel() {
				return label;
			}
			
		}
		return new PDestination(s);
	}
	
	public static void main(String[] args) {
		Parcel5 p = new Parcel5();
		Destination d = p.dest("Nairobi");
		
		
	}
}
